var express = require('express');
var router = express.Router();

/* GET home page. */
router.get('/', function(req, res, next) {

  // 判断用户是否登录，登录了true的变量，为登录，false的变量

  // 获取的数据库中的数据，处理之后，传给页面模板

  res.render('index', {
    title: 'Express',
    msg:"hello express",
    num: 365,
    flag: false,
    arr: ["北京","上海","广州","深圳","杭州"],
    obj: {
      name:"admin",
      age:18,
      sex:"男"
    },
    show(){
      return "hello" + " world";
    },
    str: "<b>文字</b>"
  });
});

module.exports = router;
